<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
             
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html>
  <head>
    <base href="<%=basePath%>"> 
    
    <title>My JSP 'index.jsp' starting page</title>
    	<script type="text/javascript" src="js/jquery-1.8.0.js"></script> 
    	<link rel="stylesheet" type="text/css" href="css/maintable.css" ></link>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	
	
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script>
	function  lock(id){
			if(confirm('确定要删除吗')){
			window.location.href="RoleServlet.do?flag=delete&roleId="+id;
		}
	}
		</script>
  </head>
  
  
  <body>
  <div class ="div_title">
						<div class="div_titlename"> <img src="images/san_jiao.gif" ><span>角色列表</span></div>
		  	<div class="div_titleoper"></div>
				 </div>
		 <form action="xxx"  name="form1"  id="from1"  method="post">
				 <table class="main_table" >
				       <tr>
				 					<th>角色名称</th> 	<th>角色描述</th>	<th>操作</th>  
				 		</tr>
				 		
				 		<c:forEach var="role" items="${roleList }">
				 		<tr>
				 				<td>${role.roleName}</td>		
				 				<td>${role.des } </td>	
				 				<td>
				 				
					 				<a href="perm/role_modify.jsp?roleId=${role.id }&note=${role.des}&roleName=${role.roleName}">修改</a> |  	
					 			    <a href="javascript:lock(${role.id })">删除</a> | 
									<a href="RoleServlet.do?flag=roleEdit&id=${role.id}">角色权限分配</a> 

				 				</td>
				 		</tr>
				 		</c:forEach>
				</table>
				</form>
				<script>
				var msg='${msg}';
				if(msg!=''){
					alert(msg);
				}
				</script>
	 </body>
</html>